package cate.common.table.guild.task;

import cate.common.table.ESheet;
import cate.common.util.random.RWList;

public class GuildTaskGroupSheet  extends ESheet<GuildTaskGroupRow> {
    @Override
    public String getSheetName() {
        return "内政任务组权重";
    }

    private RWList<GuildTaskGroupRow> rwl;

    public void onLoaded() {
        rwl = new RWList<>();
        rwl.setup(list);
    }

    public int randomGroup() {
        GuildTaskGroupRow row = rwl.get();
        if (row != null) {
            return row.id;
        }
        return -1;
    }

}
